package com.example.bluetoothservicedemo

import android.Manifest
import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.tdk.common.util.PermissionUtil
import kotlinx.coroutines.launch

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        lifecycleScope.launch {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
                PermissionUtil.requestPermissions(
                    this@MainActivity, arrayOf(
                        Manifest.permission.BLUETOOTH_CONNECT,
                    )
                )
            }
        }
    }
}